home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / altd.doc < prev    next >
Text File  |  1995-03-31  |  6KB  |  146 lines

  1. (Comp.sys.handhelds) 
  2. Item: 892 by n233dk at tamuts.tamu.edu 
  3. Author: [Rick Grevelle] 
  4.   Subj: Alternate Stack Display (Fast) 
  5.   Date: Fri Oct 12 1990 09:52  
  6.  
  7. While it is understandable that many users would like too see HP release more 
  8. information about the internals of their calculators, personally I'm rather 
  9. ambivalent.  To me, the HP48 is a Rubic's Cube; a puzzle of sorts.  Releasing 
  10. limited details about the 48's internals could enhance playing the GAME. 
  11. Disclose too much information, and it could possibly ruin most of the fun. 
  12.  
  13. At first this may seem a somewhat strange and selfish attitude, but considering 
  14. all of the arguments regarding the alleged unethical publishing practices of HP 
  15. employees, it's really not.  Undoubtedly, those individuals who would seriously 
  16. limit, or completely prohibit, the flow of this valuable source of information 
  17. are unquestionabley moon struck.  Information of this caliber does indeed serve 
  18. to enhance the GAME, as well as provide those more serious users with valuable 
  19. new tools. 
  20.  
  21. Although I've yet to aquire Mr. Donnelly's Tool Kit, I fully intend to do so. 
  22. Judging from the reviews seen here, not only do I feel that the software merits 
  23. high praise, but also requires the continuous support of the user community if 
  24. we are to see more such software.  After all, individual members of the design 
  25. team are not required to publish in order to stay employed.  Mr. Donnelly and 
  26. various other design team members who chose to invest their personal time and  
  27. energy towards enhancing the very products they are producing, should be  
  28. commended for their efforts.   
  29.  
  30. A case and point.  It has now been so long that I can't actually recall exactly 
  31. when it was I first purchased Dr. Wickes' book, "HP-28C/S Insights".  Studying 
  32. this excellently written document for uncountable hours  enabled to me master 
  33. the stack oriented programming language, RPL, utilizing KEY WORD commands and 
  34. functions.  While it took Alonzo Gariepy and his Processor Notes to provide me 
  35. with the necessary tools to begin Saturn Assembler, it was Wickes' book which 
  36. laid the foundation so crucially needed for development of an understanding of 
  37. of RPL internally. 
  38.  
  39. Here I have chosen to illustrate the point using an alternate stack display 
  40. routine.  It exemplifies RPL programming on an internal level very much in the 
  41. manner of HP.  Programs such as this can be easily modified in order to call 
  42. user written machine code routines.  An excellent example that utilizes this 
  43. technique has already been provided by Dr. Wickes himself when he posted the 
  44. encoding schemes ->ASC and ASC->.  Currently, I'm writing almost all of my 
  45. routines on this level for the reasons that programs written utilizing KEY 
  46. WORDS are often quite slow by comparison, and considerably less challenging. 
  47.  
  48. The routine displays a seven level stack leaving the menu bar intact.  It's 
  49. considerably faster than any of the other alternate stack display routines to 
  50. date.  Because I've only documented about a thousand SYSEVALs in the 48, there 
  51. is obviously a great possiblility the routine could be improved to a point to  
  52. where it would not be recognizable from what appears here.  Documenting new  
  53. SYSEVALs and making improvements to already existing routines such as these  
  54. provides a great deal of pleasure.  Should HP choose to make available to the 
  55. public their colossal files documenting the 48's internals, they would in  
  56. essence solve the puzzle and kill the thrill of reverse engineering the  
  57. calculator. 
  58.  
  59. The RPL disassembly is presented in the same style as Eric Toonen's ROM map 
  60. listing for the 28S.  Only a brief explanation appears aside each address. 
  61. Several of the addresses can NOT be SYSEVALed as they're only availble for use 
  62. in routines written in this fashion.  To package up the program I've included 
  63. two choices.  The first, CALTD, can be entered via the 48's keybaord and will 
  64. in turn create the alternate display program ALTD on the stack.  Make doubly 
  65. sure to checksum CALTD before using it to create ALTD.  I'll be glad to answer 
  66. any questions. 
  67.  
  68. Rick Grevelle 
  69.  
  70. Alternate Stack Display Routine 
  71.  
  72. 02D90   begin_RPL 
  73. 0403F   short_integer_<8h> 
  74. 073CE   start_1_to_n-1 
  75. 07221   current_loop_count 
  76. 18DBF   short->real 
  77. 162AC   real->string 
  78. 15442   string_": " 
  79. 05193   +_1string2string    
  80. 0314C   depth 
  81. 07221   current_loop_count 
  82. 03D83   boolean_>_1short2short 
  83. 03188   dup 
  84. 619AD   branch_if_true 
  85. 02D9D   begin RPL 
  86. 03244   drop 
  87. 0403F   short_integer_<8h> 
  88. 07221   current_loop_increment 
  89. 03DE0   -_1short2short 
  90. 12429   display_string_131x8_1short2string 
  91. 07334   next 
  92. 391EE   freeze_display 
  93. 0312B   end RPL 
  94. 61993   branch_if_false 
  95. 02D9D   begin RPL 
  96. 032C2   over 
  97. 15978   ->string_1any 
  98. 05193   +_1string2string 
  99. 0403F   short_integer_<8h> 
  100. 07221   current_loop_count 
  101. 03DE0   -_1short2short 
  102. 12429   display_string_131x8_1short2string 
  103. 03140   depth 
  104. 04035   short_integer_<7h> 
  105. 624BA   min_1short2short 
  106. 0339E   rolld_1short2any...nany 
  107. 07334   next 
  108. 0400D   short_integer_<3h> 
  109. 142FB   freeze_display_1short 
  110. 0312B   end RPL 
  111. 0312B   end RPL 
  112.  
  113. CALTD 
  114. (BYTES: #A1B8h 243.5) 
  115.  
  116. %%HP: T(1)A(D)F(.); 
  117. \<< 
  118. # 1073CE0403F02D9Dh 
  119. # 42162AC18DBF0722h 
  120. # 2210314C05193154h 
  121. # 19AD0318803D8307h 
  122. # 403F0324402D9D6h 
  123. # 41242903DE007221h 
  124. # 930312B391EE0733h 
  125. # 978032C202D9D619h 
  126. # 72210403F0519315h 
  127. # 314C1242903DE00h 
  128. # 40339E624BA04035h 
  129. # 2B142FB0400D0733h 
  130. # 312B031h 1 12 
  131.   START # 5193h SYSEVAL 
  132.   NEXT # 4003h SYSEVAL # 62B9Ch SYSEVAL 
  133. \>> 
  134.  
  135.  
  136. ALTD (Requires ASC->) 
  137.  
  138. %%HP: T(1)A(D)F(.); 
  139. "D9D20F3040EC37012270FBD81CA2612445139150C41301227038D3088130DA91 
  140. 6D9D2044230F3040122700ED309242143370EE193B213039916D9D202C230879 
  141. 5139150F3040122700ED3092421C413053040AB426E933043370D0040BF241B2 
  142. 130B2130C5D9" 
  143.  
  144. [Note: You can use 'betaENTER' to force ALTD to run after each keystroke; 
  145. see STACK.DOC for details of vectored enter usage.  -jkh-] 
  146.